/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.jm.acionista.filter;

import java.awt.Color;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;

/**
 *
 * @author joao
 */
public class TeclaPressionada {  
    private boolean lTecla;
      
    KeyListener key = new KeyListener() {

        public void keyTyped(KeyEvent e) {
            if(e.getKeyCode() == KeyEvent.VK_ENTER) {
                lTecla = true;
            }
        }

        public void keyPressed(KeyEvent e) {
            if(e.getKeyCode() == KeyEvent.VK_ENTER) {
                lTecla = true;
            }
        }

        public void keyReleased(KeyEvent e) {
            if(e.getKeyCode() == KeyEvent.VK_ENTER) {
                lTecla = true;
            }
        }
    }; 
    
    public boolean TeclaDigitada() {
        
        return lTecla;
    }
}  